<HTML> 
<HEAD> 
	<TITLE>3rd Party ROBOTC Drivers</TITLE> 
<link href="tabs.css" rel="stylesheet" type="text/css"/> 
<link href="doxygen.css" rel="stylesheet" type="text/css"/> 
</HEAD> 
 
<BODY bgcolor="#ffffff" link="#000000" vlink="#000000"> 
<table width="100%" bgcolor="navy" cellspacing=0 cellpadding=1 border=0> 
<tr><td><table width="100%" bgcolor="#EEEEDD" cellspacing=0 cellpadding=3 border=0> 
<tr> 
    <td width="33%" align="left"> <img src="images/LOGO_NXT.gif" width=266 height=44 border="0" alt="Mindstorms"></td> 
    <td><b><font size="+3" color="navy">3rd Party ROBOTC Drivers</font></b></td> 
    <td align="right"> <img src="images/logo.png" width=44 height=44 border="0" alt="RobotC"></td>     
</tr> 
  <tr bgcolor="#cccc99" align="right"> 
          <td colspan=3> <font face="arial" size="-1"> [<a href=main.html>Home</a>] [<a target=_top href="https://sourceforge.net/projects/rdpartyrobotcdr/">Download</a>] [<a target=_top href="http://apps.sourceforge.net/mantisbt/rdpartyrobotcdr/my_view_page.php">Submit a bug/suggestion</a>]  [<a target=_top href="http://www.robotc.net/forums/">ROBOTC Forums</a>] [<a target=_top href="http://botbench.com">Blog</a>] [<a target=_top href="http://sourceforge.net/donate/index.php?group_id=257238">Support this project</a>]</font> </td> 
</tr> 
</table></td></tr> 
</table> 
<!-- Generated by Doxygen 1.7.2 -->
<div class="header">
  <div class="summary">
<a href="#files">Files</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<h1>Acceleration Sensor<br/>
<small>
[<a class="el" href="group___hi_technic.html">HiTechnic</a>]</small>
</h1>  </div>
</div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="files"></a>
Files</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hitechnic-accelerometer_8h.html">hitechnic-accelerometer.h</a></td></tr>

<p><tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>HiTechnic Acceleration Sensor driver. </p>
<br/></td></tr>
</p>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htacc.html#ga7912e28221d7e2a639d90fd332f39a11">HTAC_I2C_ADDR</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htacc.html#ga2a65f372db998c8588557e95a81e4328">HTAC_OFFSET</a>&#160;&#160;&#160;0x42</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htacc.html#gaf72832b6920f60d7a36ec23759e78c05">HTAC_X_UP</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htacc.html#gaa83dd73418f2674b14bf6edb8bc6b4f1">HTAC_Y_UP</a>&#160;&#160;&#160;0x01</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htacc.html#ga596f71e3751b88007902afd04f0e98a9">HTAC_Z_UP</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htacc.html#ga658ae42e2b625c092570684db3ab98a8">HTAC_X_LOW</a>&#160;&#160;&#160;0x03</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htacc.html#gae9e57f0e95f1df813c0c6d588334d1f1">HTAC_Y_LOW</a>&#160;&#160;&#160;0x04</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htacc.html#ga60794718acb6105c8a45457b577f6834">HTAC_Z_LOW</a>&#160;&#160;&#160;0x05</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htacc.html#gadd649768894fea35389524ff822316c8">HTACreadAllAxes</a> (tSensors link, int &amp;x, int &amp;y, int &amp;z)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htacc.html#ga6193f6a84482a5173926fe3a04ff3b27">HTACreadAllAxes</a> (<a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a> muxsensor, int &amp;x, int &amp;y, int &amp;z)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__htsmux.html#gae535601c6d1a8544ed23e79d545ce45c">tConfigParams</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htacc.html#gae76bc90fffbebbd6a52dd1e717f7395b">HTAC_config</a> = {HTSMUX_CHAN_I2C, 6, 0x02, 0x42}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htacc.html#ga603ec3799c580f0bc1be718427f9ba54">HTAC_I2CRequest</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htacc.html#gae4f38effb68e54e4b59d4427a2d8b002">HTAC_I2CReply</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>HiTechnic Acceleration Sensor </p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="ga7912e28221d7e2a639d90fd332f39a11"></a><!-- doxytag: member="hitechnic&#45;accelerometer.h::HTAC_I2C_ADDR" ref="ga7912e28221d7e2a639d90fd332f39a11" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTAC_I2C_ADDR&#160;&#160;&#160;0x02</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>IR Seeker I2C device address </p>

<p>Definition at line <a class="el" href="hitechnic-accelerometer_8h_source.html#l00052">52</a> of file <a class="el" href="hitechnic-accelerometer_8h_source.html">hitechnic-accelerometer.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga2a65f372db998c8588557e95a81e4328"></a><!-- doxytag: member="hitechnic&#45;accelerometer.h::HTAC_OFFSET" ref="ga2a65f372db998c8588557e95a81e4328" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTAC_OFFSET&#160;&#160;&#160;0x42</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Offset for data registers </p>

<p>Definition at line <a class="el" href="hitechnic-accelerometer_8h_source.html#l00053">53</a> of file <a class="el" href="hitechnic-accelerometer_8h_source.html">hitechnic-accelerometer.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga658ae42e2b625c092570684db3ab98a8"></a><!-- doxytag: member="hitechnic&#45;accelerometer.h::HTAC_X_LOW" ref="ga658ae42e2b625c092570684db3ab98a8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTAC_X_LOW&#160;&#160;&#160;0x03</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>X axis lower 2 bits </p>

<p>Definition at line <a class="el" href="hitechnic-accelerometer_8h_source.html#l00057">57</a> of file <a class="el" href="hitechnic-accelerometer_8h_source.html">hitechnic-accelerometer.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaf72832b6920f60d7a36ec23759e78c05"></a><!-- doxytag: member="hitechnic&#45;accelerometer.h::HTAC_X_UP" ref="gaf72832b6920f60d7a36ec23759e78c05" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTAC_X_UP&#160;&#160;&#160;0x00</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>X axis upper 8 bits </p>

<p>Definition at line <a class="el" href="hitechnic-accelerometer_8h_source.html#l00054">54</a> of file <a class="el" href="hitechnic-accelerometer_8h_source.html">hitechnic-accelerometer.h</a>.</p>

</div>
</div>
<a class="anchor" id="gae9e57f0e95f1df813c0c6d588334d1f1"></a><!-- doxytag: member="hitechnic&#45;accelerometer.h::HTAC_Y_LOW" ref="gae9e57f0e95f1df813c0c6d588334d1f1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTAC_Y_LOW&#160;&#160;&#160;0x04</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Y axis lower 2 bits </p>

<p>Definition at line <a class="el" href="hitechnic-accelerometer_8h_source.html#l00058">58</a> of file <a class="el" href="hitechnic-accelerometer_8h_source.html">hitechnic-accelerometer.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaa83dd73418f2674b14bf6edb8bc6b4f1"></a><!-- doxytag: member="hitechnic&#45;accelerometer.h::HTAC_Y_UP" ref="gaa83dd73418f2674b14bf6edb8bc6b4f1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTAC_Y_UP&#160;&#160;&#160;0x01</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Y axis upper 8 bits </p>

<p>Definition at line <a class="el" href="hitechnic-accelerometer_8h_source.html#l00055">55</a> of file <a class="el" href="hitechnic-accelerometer_8h_source.html">hitechnic-accelerometer.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga60794718acb6105c8a45457b577f6834"></a><!-- doxytag: member="hitechnic&#45;accelerometer.h::HTAC_Z_LOW" ref="ga60794718acb6105c8a45457b577f6834" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTAC_Z_LOW&#160;&#160;&#160;0x05</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Z axis lower 2 bits </p>

<p>Definition at line <a class="el" href="hitechnic-accelerometer_8h_source.html#l00059">59</a> of file <a class="el" href="hitechnic-accelerometer_8h_source.html">hitechnic-accelerometer.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga596f71e3751b88007902afd04f0e98a9"></a><!-- doxytag: member="hitechnic&#45;accelerometer.h::HTAC_Z_UP" ref="ga596f71e3751b88007902afd04f0e98a9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTAC_Z_UP&#160;&#160;&#160;0x02</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Z axis upper 8 bits </p>

<p>Definition at line <a class="el" href="hitechnic-accelerometer_8h_source.html#l00056">56</a> of file <a class="el" href="hitechnic-accelerometer_8h_source.html">hitechnic-accelerometer.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gadd649768894fea35389524ff822316c8"></a><!-- doxytag: member="hitechnic&#45;accelerometer.h::HTACreadAllAxes" ref="gadd649768894fea35389524ff822316c8" args="(tSensors link, int &amp;x, int &amp;y, int &amp;z)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool HTACreadAllAxes </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"> <em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"> <em>z</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Read the value of all the axes registers return by reference </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTAC port number </td></tr>
    <tr><td class="paramname">x</td><td>x axis </td></tr>
    <tr><td class="paramname">y</td><td>y axis </td></tr>
    <tr><td class="paramname">z</td><td>z axis </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if no error occured, false if it did </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="hitechnic-accelerometer-_s_m_u_x-test1_8c-example.html#a1">hitechnic-accelerometer-SMUX-test1.c</a>, and <a class="el" href="hitechnic-accelerometer-test1_8c-example.html#a0">hitechnic-accelerometer-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="hitechnic-accelerometer_8h_source.html#l00080">80</a> of file <a class="el" href="hitechnic-accelerometer_8h_source.html">hitechnic-accelerometer.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga6193f6a84482a5173926fe3a04ff3b27"></a><!-- doxytag: member="hitechnic&#45;accelerometer.h::HTACreadAllAxes" ref="ga6193f6a84482a5173926fe3a04ff3b27" args="(tMUXSensor muxsensor, int &amp;x, int &amp;y, int &amp;z)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool HTACreadAllAxes </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a>&#160;</td>
          <td class="paramname"> <em>muxsensor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"> <em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"> <em>z</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Read the value of all the axes registers return by reference </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">muxsensor</td><td>the SMUX sensor port number </td></tr>
    <tr><td class="paramname">x</td><td>x axis </td></tr>
    <tr><td class="paramname">y</td><td>y axis </td></tr>
    <tr><td class="paramname">z</td><td>z axis </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if no error occured, false if it did </dd></dl>

<p>Definition at line <a class="el" href="hitechnic-accelerometer_8h_source.html#l00115">115</a> of file <a class="el" href="hitechnic-accelerometer_8h_source.html">hitechnic-accelerometer.h</a>.</p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="gae76bc90fffbebbd6a52dd1e717f7395b"></a><!-- doxytag: member="hitechnic&#45;accelerometer.h::HTAC_config" ref="gae76bc90fffbebbd6a52dd1e717f7395b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__htsmux.html#gae535601c6d1a8544ed23e79d545ce45c">tConfigParams</a> <a class="el" href="group__htacc.html#gae76bc90fffbebbd6a52dd1e717f7395b">HTAC_config</a> = {HTSMUX_CHAN_I2C, 6, 0x02, 0x42}</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Array to hold SMUX config data for sensor </p>

<p>Definition at line <a class="el" href="hitechnic-accelerometer_8h_source.html#l00066">66</a> of file <a class="el" href="hitechnic-accelerometer_8h_source.html">hitechnic-accelerometer.h</a>.</p>

</div>
</div>
<a class="anchor" id="gae4f38effb68e54e4b59d4427a2d8b002"></a><!-- doxytag: member="hitechnic&#45;accelerometer.h::HTAC_I2CReply" ref="gae4f38effb68e54e4b59d4427a2d8b002" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a> <a class="el" href="group__htacc.html#gae4f38effb68e54e4b59d4427a2d8b002">HTAC_I2CReply</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Array to hold I2C reply data </p>

<p>Definition at line <a class="el" href="hitechnic-accelerometer_8h_source.html#l00070">70</a> of file <a class="el" href="hitechnic-accelerometer_8h_source.html">hitechnic-accelerometer.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga603ec3799c580f0bc1be718427f9ba54"></a><!-- doxytag: member="hitechnic&#45;accelerometer.h::HTAC_I2CRequest" ref="ga603ec3799c580f0bc1be718427f9ba54" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a> <a class="el" href="group__htacc.html#ga603ec3799c580f0bc1be718427f9ba54">HTAC_I2CRequest</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Array to hold I2C command data </p>

<p>Definition at line <a class="el" href="hitechnic-accelerometer_8h_source.html#l00069">69</a> of file <a class="el" href="hitechnic-accelerometer_8h_source.html">hitechnic-accelerometer.h</a>.</p>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Mar 13 2013 19:56:44 for ROBOTC Drivers by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
</body>
</html>
